console.log('通用注入: MAIN');
console.log(chrome);
(function (xhr){
  if (XMLHttpRequest.prototype.modifyFlag) return;
  var XHR = XMLHttpRequest.prototype;
  XHR.mdifyFlag = true;
  var open = XHR.open;
  var send = XHR.send;
  XHR.open = function (method, url){
    this._method = method;
    this._url = url;
    return open.apply(this, arguments);
  };
  XHR.send = function (){
    // console.log(this)
    // 这里替换target_path即可获取到想要的请求
    if (this._url.includes('/vc/setting')){
      this.addEventListener('load', function (xhr){
        console.log('xhr', xhr);
        if (xhr.currentTarget.status === 200) {
          let response = JSON.parse(xhr.currentTarget.response);
          console.log(response)
        }
      })
    }
    return send.apply(this, arguments);
  };
})(XMLHttpRequest);